package com.ruoyi.wechat.service.impl;

import java.util.List;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wechat.mapper.CampsiteMapper;
import com.ruoyi.wechat.domain.Campsite;
import com.ruoyi.wechat.service.ICampsiteService;

/**
 * 营位管理Service业务层处理
 * 
 * @author jiang
 * @date 2024-11-04
 */
@Service
public class CampsiteServiceImpl implements ICampsiteService 
{
    @Autowired
    private CampsiteMapper campsiteMapper;

    /**
     * 查询营位管理
     * 
     * @param campsiteId 营位管理主键
     * @return 营位管理
     */
    @Override
    public Campsite selectCampsiteByCampsiteId(String campsiteId)
    {
        return campsiteMapper.selectCampsiteByCampsiteId(campsiteId);
    }

    /**
     * 查询营位管理列表
     * 
     * @param campsite 营位管理
     * @return 营位管理
     */
    @Override
    public List<Campsite> selectCampsiteList(Campsite campsite)
    {
        return campsiteMapper.selectCampsiteList(campsite);
    }

    /**
     * 新增营位管理
     * 
     * @param campsite 营位管理
     * @return 结果
     */
    @Override
    public int insertCampsite(Campsite campsite)
    {
        campsite.setCampsiteId(UUID.randomUUID().toString());
        return campsiteMapper.insertCampsite(campsite);
    }

    /**
     * 修改营位管理
     * 
     * @param campsite 营位管理
     * @return 结果
     */
    @Override
    public int updateCampsite(Campsite campsite)
    {
        return campsiteMapper.updateCampsite(campsite);
    }

    /**
     * 批量删除营位管理
     * 
     * @param campsiteIds 需要删除的营位管理主键
     * @return 结果
     */
    @Override
    public int deleteCampsiteByCampsiteIds(String[] campsiteIds)
    {
        return campsiteMapper.deleteCampsiteByCampsiteIds(campsiteIds);
    }

    /**
     * 删除营位管理信息
     * 
     * @param campsiteId 营位管理主键
     * @return 结果
     */
    @Override
    public int deleteCampsiteByCampsiteId(String campsiteId)
    {
        return campsiteMapper.deleteCampsiteByCampsiteId(campsiteId);
    }
}
